<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订阅管理</title>
</head>
<link href="<?php echo $this->baseUrl;?>/admincss/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/admincss/thickbox.css" rel="stylesheet" type="text/css" />

<script>
var baseUrl = "<?php echo $this->baseUrl;?>";
var mid = <?php echo $this->mid;?>;
</script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/thickbox.compressed.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/subscribe.js" /></script>
<body>
<?php
$backurl = $this->url($this->baseUrl, "meet", "list", "nowp=" . $this->onowp);
?>
<table width="100%" border="1" class="tableA">
<tr><td colspan="6">发送邮件<a href="<?php echo $backurl;?>">返回</a></td></tr>
  <tr>
    <td>选择</td>
    <td>邮件地址</td>
    <td>发送次数</td>
    <td>注册码</td>
    <td>是否注册</td>
  </tr><!--
<?php
foreach ($this->list as $v){

print <<<EOT
-->
  <tr>
    <td><input type="checkbox" name="eid" value="{$v['eid']}" checked="checked" /></td>
    <td nowrap>{$v['email']}</td>
    <td nowrap>{$v['send']}</td>
    <td nowrap>{$v['code']}</td>
    <td nowrap>{$v['isreg']}</td>
  </tr><!--
EOT;
}

$ext = "&type={$this->type}&typeid={$this->typeid}";
$indexurl =$this->url($this->fullUrl, 'subscribe', 'list', 'nowp=1' . $ext);
$nexturl = $this->url($this->fullUrl, 'subscribe', 'list', 'nowp='.$this->page['next'] . $ext);
$preurl = $this->url($this->fullUrl, 'subscribe', 'list', 'nowp='.$this->page['previous'] . $ext);
$lasturl = $this->url($this->fullUrl, 'subscribe', 'list', 'nowp='.$this->page['totalpage'] . $ext);
print <<<EOT
-->
  <tr>
    <td colspan="6">
<a href="{$backurl}">返回</a>
<a href="#" onclick="javascript:return selectAll();">全选</a> 
<a href="#" onclick="javascript:return selectOpp();">反选</a> 
<a href="#" onclick="javascript:return UnselectAll();">全不选</a>
&nbsp;&nbsp;
<a href="#" onclick="javascript:return SendMail('select');">选中项发送邮件</a>
<a href="#" onclick="javascript:return SendMail('all');">给所有人发送邮件</a>
</td>
  </tr>
<!--
EOT;
?>-->
</table>
<p>&nbsp;</p><p>&nbsp;</p>

<div id="myOnPageContent" style="display:none">
<div>选中发送邮件模板：<select id="mail_template">
<option value="0" selected="selected">选择模板</option>
<?php
foreach ($this->templates as $v){
	$v['name'] = htmlspecialchars($v['name']);
	echo "<option value={$v['tid']}>{$v['name']}</option>";
}
?>
</select>
<p></p><p></p>
<p align="center"><input id="btn_send" onclick="javascript:doSendMail();return false;" type="button" value="发送邮件"/>
&nbsp;&nbsp;&nbsp;
<input onclick="javascript:tb_remove();return false;" type="button" value="取消"/>
</p>
</div>
</div>
</body>
</html>
